package com.hx.vending.dao;

import com.hx.vending.bean.Field;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface FieldMapper {

    Field selectByPrimary(Field field);

    List<Field> selectByExample(Field field);

    int updateByPrimaryKeySelective(Field field);

    int insertSelective(Field field);

    int deleteByPrimaryKey(Integer fieldId);

    List<Field> selectByFiExample(@Param("condition") String condition,@Param("pageStart") Integer pageStart,
                                  @Param("integers") Integer[] integers);

    List<Map<String, Object>> selectByFieldList(@Param("fieldList") List<Integer> fieldList,@Param("userId")Integer userId);

    List<Field> selectFieldByUserId(@Param("userId") Integer userId);

    Integer[] selectIdByUserId(@Param("userId") Integer userId);

    List<Field> selectFieldById(@Param("integers") Integer[] integers);

    List<Field> selectFieldByIdPage(@Param("integers") Integer[] integers,@Param("pageStart") Integer pageStart,@Param("pageStart") Integer pageSize);

    Field selectFildById(@Param("fieldId") Integer fieldId);
}
